<template>
    <pageViewContainer :showHeader="false">
        <div style="background-color: #fff;height: 100%;color: #323232;" class="column xy_center">
            <div style="max-width: 300px;text-align: center;gap: 10px;" class="column xy_center">
                <h1 style="font-size: 1.5em;">{{ testStore.name }}</h1>
                <el-button type="primary" :loading="loading" @click="getTestData">异步加载数据并修改store</el-button>
            </div>
        </div>
    </pageViewContainer>
</template>
<script>
import { useTestStore } from "../stores/test";
export default {
    data() {
        return {
            loading: false
        }
    },
    computed: {
        testStore() {
            return useTestStore();
        }
    },
    methods: {
        async getTestData() {
            this.loading = true;
            await this.testStore.getTestData();
            this.loading = false;
        }
    }
}
</script>
